<template>
  <div class="zq_member">
    <li class="member_item">

      <div class="member_icon">
        <h5>{{ itemData.leftTitle }}</h5>
        <div class="member_money">
          <span class="member_money_num">{{ itemData.money }}</span> <i>元</i>
        </div>
        <div class="member_item_dec">
          <p class="member_dec_num">{{ itemData.dec_num }}</p>
          <p class="member_dec_time">有效期还剩{{ itemData.time }}天</p>
        </div>
      </div>

      <div class="member_item_main">
        <div class="member_main_left">
          <h5>{{ itemData.rightTitle }}：</h5>
          <div>
            <p v-for="(list, index) in itemData.useItem" :key="index">
              {{ list }}
            </p>
          </div>
          <p class="member_main_time">有效期：{{ itemData.indate }}</p>
        </div>
        <!---->
        <!---->
        <div @click="showMember()" class="member_main_right">开通会员使用</div>
        <!---->
        <!---->
      </div>

    </li>
  </div>
</template>

<script>
export default {
  name: 'ubMember',
  props: {
    itemData: {
      type: Object,
      require: true
    }
  },
  methods: {
    // 开通会员点击事件
    showMember () {
      console.log(1)
    }
  }
}
</script>

<style lang='less' scoped>
.zq_member {
  padding: 20px;
  background-color: #fff;
  .member_item {
    padding: 25px 0;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #f2f2f2;
    .member_icon {
      box-sizing: border-box;
      padding-top: 20px;
      padding-left: 28px;
      padding-right: 22px;
      width: 246px;
      height: 142px;
      background: #ffe9d0;
      box-shadow: 0px 0px 6px 2px rgb(68 68 68 / 6%);
      border-radius: 8px;
      h5 {
        font-size: 14px;
        line-height: 18px;
        color: #333333;
      }
      .member_money {
        margin: 5px 0;
        .member_money_num {
          display: inline-block;
          text-align: center;
          height: 64px;
          line-height: 64px;
          font-weight: bold;
          font-size: 48px;
          color: #ec6f36;
        }
        i {
          font-style: normal;
          font-size: 14px;
          line-height: 18px;
          color: #ec6f36;
        }
      }
      .member_item_dec {
        display: flex;
        justify-content: space-between;
        .member_dec_num {
          text-align: center;
          font-size: 12px;
          line-height: 15px;
          color: #917955;
        }
        .member_dec_time {
          font-size: 12px;
          line-height: 15px;
          color: #e60012;
        }
      }
    }
    .member_item_main {
      padding-right: 48px;
      height: 142px;
      flex: 1;
      display: flex;
      justify-content: space-between;
      align-items: center;
      .member_main_left {
        position: relative;
        height: 142px;
        padding-top: 12px;
        padding-left: 48px;
        .member_main_time {
          position: absolute;
          bottom: 8px;
          left: 48px;
          font-size: 14px;
          line-height: 18px;
          color: #c4c4c4;
        }
        h5 {
          font-size: 18px;
          line-height: 23px;
          color: #333333;
        }
        div {
          margin-top: 6px;
          height: 54px;
          font-size: 14px;
          line-height: 18px;
          color: #555555;
          p {
            font-size: 14px;
            line-height: 18px;
            color: #555555;
          }
        }
      }
      .member_main_right {
        width: 150px;
        height: 38px;
        line-height: 38px;
        background: linear-gradient(90.06deg, #ffe9d0 0.42%, #fcc989 98.84%);
        box-shadow: 0px 2px 2px rgb(192 107 0 / 12%);
        border-radius: 27px;
        text-align: center;
        color: #875603;
        border: none;
        outline: none;
        cursor: pointer;
        font-size: 16px;
      }
    }
  }
}
</style>
